#ifndef QQ_ENTRY_CONTROLLER
#define QQ_ENTRY_CONTROLLER

#include <qobject.h>

#include "core/QQSettings.h"

#include "network/QQNetWork.h"

#include "entry/QQEntryView.h"

class QQEntryController : public QObject
{
	Q_OBJECT
public:
	QQEntryController(QWidget* parent = nullptr);
	~QQEntryController();

	void doReadyRead(const QJsonObject& data);
signals:
	void entrySuccess(const QString& account);
public slots:
	void showView();
	void closeView();
private slots:
	void doEntryInfoSubmit(const QString& account, const QString& password);
	void doRegisterInfoSubmit(const QString& nickname, const QString& phone, const QString& password);
	void doFindPasswordInfoSubmit(const QString& account, const QString& phone);
private:
	QQEntryView* mEntryView;
};

#endif // QQ_ENTRY_CONTROLLER